<template>
  <div class="detail con-layout">
    <div class="header">
      <span class="arrow" @click="back_btn"></span>
      <h3 class="title">{{baseTxt}}</h3>
    </div>
    <div class="detail-top">
      <div class="detail-name">
        <span class="name">{{list.djlxmc}}</span>
        <span class="bl">{{list.bljgmc}}</span>
      </div>
      <div class="detail-time">
        <span>申请日期：{{list.sqsj?list.sqsj:"--"}}</span>
        <span>登记日期：{{list.djsj?list.djsj:"--"}}</span>
      </div>
      <div class="detail-progress">进度说明：{{list.blsm?list.blsm:"--"}}</div>
    </div>
    <div class="detail-content">
      <div class="detail-item">
        <div class="item-top">
          <span>基本资料</span>
        </div>
        <div class="item-bottom">
          <div class="item-text text-name">
            <span>{{list.xm}}</span>
            <p>{{list.xb}}丨{{list.whcd}}丨{{list.hjxz}}</p>
          </div>
          <div class="item-text">
            <span>{{list.zjlx =="01" ?'身份证号码：':'证件号码：'}}</span>
            <p>{{list.zjhm}}</p>
          </div>
          <div class="item-text">
            <span>出生日期：</span>
            <p>{{list.csrq}}</p>
          </div>
          <div class="item-text">
            <span>手机号码：</span>
            <p>{{list.sjhm}}</p>
          </div>
          <div class="item-text">
            <span>户籍地址：</span>
            <p>{{list.hjxzqhmc}} {{list.hjdxxdz}}</p>
          </div>
          <div class="item-text">
            <span>居住地址：</span>
            <p>{{list.czdxzqhmc}} {{list.czdxxdz}}</p>
          </div>
          <div class="item-text" v-if="list.zjlx !== '01'">
            <span>社会保障卡号：</span>
            <p>{{list.shbzkh}}</p>
          </div>
          <div class="item-text" v-if="list.xxmc">
            <span>毕业院校：</span>
            <p>{{list.xxmc}}</p>
          </div>
          <div class="item-text" v-if="list.xdxlzsrq">
            <span>毕业时间：</span>
            <p>{{list.xdxlzsrq}}</p>
          </div>
          <div class="item-text" v-if="list.zymc">
            <span>专业名称：</span>
            <p>{{list.zymc}}</p>
          </div>
          <div class="item-text" v-if="list.gzmc">
            <span>职业工种：</span>
            <p>{{list.gzmc}}</p>
          </div>
          <div class="item-text" v-if="list.zyjsdj">
            <span>技术等级：</span>
            <p>{{list.zyjsdj}}</p>
          </div>
          <div class="item-text" v-if="list.zyjsdj">
            <span>证书发放日期：</span>
            <p>{{list.zsffrq}}</p>
          </div>
          <div class="item-text" v-if="list.zcmc">
            <span>职称：</span>
            <p>{{list.zcmc}}</p>
          </div>
          <div class="item-text" v-if="list.zcmc">
            <span>职称证书发放日期：</span>
            <p>{{list.zczsffrq}}</p>
          </div>
        </div>
      </div>
      <div class="detail-item" v-if="list.djlx==2">
        <div class="item-top">
          <span>就业信息</span>
        </div>
        <div class="item-bottom">
          <div class="item-text">
            <span>就业人员类型：</span>
            <p>{{list.jyrylx}}</p>
          </div>
          <div class="item-text">
            <span>失业时间：</span>
            <p>{{list.sysj}}</p>
          </div>
          <div class="item-text">
            <span>就业类型：</span>
            <p>{{list.jylx}}</p>
          </div>
          <div class="item-text" v-if="list.tyshxydm">
            <span>统一社会信用代码：</span>
            <p>{{list.tyshxydm}}</p>
          </div>
          <div class="item-text" v-if="list.zzyztpid">
            <span>营业执照：</span>
            <p class="blue" @click="imgFn(list)">点击查看</p>
          </div>
          <div class="item-text">
            <span>就业时间：</span>
            <p>{{list.jysj}}</p>
          </div>
          <div class="item-text">
            <span>就业地址：</span>
            <p>{{list.jyddmc}} {{list.jyddxxdz}}</p>
          </div>
          <div class="item-text" v-if="list.zfxysbh">
            <span>转非劳动力自谋职业协议书编号：</span>
            <p>{{list.zfxysbh}}</p>
          </div>
          <div class="item-text" v-if="list.zfxygzh">
            <span>转非劳动力自谋职业协议公证号：</span>
            <p>{{list.zfxygzh}}</p>
          </div>
          <div class="item-text" v-if="list.djdxzqhmc">
            <span>服务机构所在地：</span>
            <p>{{list.djdxzqhmc}}</p>
          </div>
          <div class="item-text" v-if="(list.zfxysj || list.list) && list.zfxysj">
            <span>协议签订时间：</span>
            <p>{{list.zfxysj}}</p>
          </div>
          <div class="item-text" v-if="(list.zfxysj || list.list) && list.gyrxm">
            <span>雇佣人姓名：</span>
            <p>{{list.gyrxm}}</p>
          </div>
          <div class="item-text" v-if="list.gyrsj">
            <span>雇佣人手机号：</span>
            <p>{{list.gyrsj}}</p>
          </div>
          <div class="item-text" v-if="list.tsfs">
            <span>特殊身份：</span>
            <p>{{list.tsfs}}</p>
          </div>
        </div>
      </div>
      <div class="detail-item" v-if="list.djlx==1">
        <div class="item-top">
          <span>失业信息</span>
        </div>
        <div class="item-bottom">
          <div class="item-text">
            <span>失业人员类型：</span>
            <p>{{list.syrylx}}</p>
          </div>
          <div class="item-text">
            <span>{{list.syrqmc}}：</span>
            <p>{{list.sysj}}</p>
          </div>
          <div class="item-text" v-if="list.zjlx == '02'">
            <span>失业原因：</span>
            <p>{{list.gatsyyy}}</p>
          </div>
          <div class="item-text" v-if="list.djdxzqhmc">
            <span>服务机构所在地：</span>
            <p>{{list.djdxzqhmc}}</p>
          </div>
          <div class="item-text" v-if="list.tsfs">
            <span>特殊身份：</span>
            <p>{{list.tsfs}}</p>
          </div>
        </div>
      </div>
    </div>

    <van-image-preview v-model="imgShow" :images="imgArr" :showIndex="false"></van-image-preview>
  </div>
</template>

<script>
export default {
  data() {
    return {
      baseTxt: "", //来源名称
      imgArr: [],
      imgShow: false,
      list: []
    };
  },
  created() {
    this.baseTxt =this.$route.query.type == "1" ? "个人就业登记查询" : "失业登记查询";
    this.init();
  },
  methods: {
    back_btn() {
      this.$router.goBack();
    },
    imgFn(list) {
      this.imgArr = [
        `${conf.urlPrefix}/jysydj/wj/tphx?filename=${list.zzyztpid}`
      ];
      this.imgShow = true;
    },
    init() {
      this.$http({
        url: "/jysydj/sqxxxxCx",
        method: "get",
        params: {
          djlx: this.$route.query.djlx,
          djid: this.$route.query.djid
        }
      }).then(res => {
        let data = res.returnData;
        if (+data.executeResult == 1) {
          this.list = data.sqxxxx;
        } else {
          this.$alert({
            message: data.message
          });
        }
      });
    }
  }
};
</script>

<style lang="scss" scoped>
@import "~common/scss/var.scss";
.detail-top {
  width: 100%;
  min-height: 250px;
  padding: 33px 33px 88px 33px;
  background: url("~common/images/search/banner.png") no-repeat center center;
  background-size: 100% 100%;
  box-sizing: border-box;
  color: #ffffff;
  position: relative;
  .detail-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 33px;
    .name {
      font-size: 33px;
      font-weight: 700;
      letter-spacing: 1px;
    }
    .bl {
      font-size: 28px;
      letter-spacing: 1px;
    }
  }
  .detail-time {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 25px;
    margin-bottom: 33px;
  }
  .detail-progress {
    position: absolute;
    bottom: -37px;
    left: 33px;
    z-index: 1;
    width: 683px;
    line-height: 38px;
    color: #333333;
    font-size: 25px;
    padding: 31px 33px 31px 38px;
    border-radius: 14px;
    background-color: #ffffff;
    box-shadow: 0px 6px 21px 0px rgba(8, 8, 61, 0.13);
    box-sizing: border-box;
    letter-spacing: -1px;
  }
}
.detail-content {
  padding: 70px 33px 33px 33px;
  box-sizing: border-box;
  .detail-item {
    padding: 33px;
    margin-bottom: 12px;
    background-color: #ffffff;
    border-radius: 14px;
    box-shadow: 0px 3px 13px 0px rgba(8, 8, 61, 0.1);
    box-sizing: border-box;
    .item-top {
      font-size: 33px;
      font-weight: 700;
      letter-spacing: 1px;
      border-bottom: 1px dashed #dbdbdb;
      span {
        display: block;
        margin-bottom: 20px;
        position: relative;
        &::before {
          content: "";
          width: 13px;
          height: 33px;
          background-color: #06a8f6;
          position: absolute;
          left: -33px;
          z-index: 1;
        }
      }
    }
    .item-bottom {
      margin-top: 34px;
      .item-text {
        display: flex;
        align-items: baseline;
        justify-content: left;
        font-size: 25px;
        margin-bottom: 16px;
        &.text-name {
          span,
          p {
            color: #333333;
            font-size: 29px;
          }
        }
        span {
          // width: 135px;
          margin-right: 10px;
          line-height: 33px;
          color: #999999;
        }
        p {
          flex: 1;
          color: #333333;
          line-height: 33px;
          &.blue {
            color: #06a8f6;
          }
        }
      }
    }
  }
}
</style>
